package org.br;

import java.io.File;
import java.io.FileFilter;


public class CodeGenerator {
	
	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {

		String sdir="C:\\linh\\iProject\\linhframe\\function-parser\\src\\main\\java\\org\\br\\plotter\\functions\\math";
		File dir=new File(sdir);
		File[] files=dir.listFiles(new FileFilter() {
			
			@Override
			public boolean accept(File pathname) {
		
				return pathname.isFile()&&pathname.getName().endsWith(".java");
			}
		});
		
		for(File file:files){
			String fileName=file.getName();
			String key=fileName.split("_")[1].split("\\.")[0];
			String className=fileName.replace(".java", "");
			System.out.println(" executer.put(\""+key+"\",new "+className+"());");
		}
		
		
	}
	
}
